from websocket import create_connection
ws = create_connection("ws://192.168.1.38:8002/ws/role/2/?fdfderqqqqq")
print("Sending 'Hello, World'...")


while True:
    result = ws.recv()
    print("Received '%s'" % result)

    # 'ff'.KF-2019032518091100008
    print(result.encode())
ws.close()